package day04;
import java.util.Scanner;
public class ExtendPractice {
    public static void main(String[] args) {
        /*
        Scanner scan=new Scanner(System.in);
        int count=0;


        for(int year=1900;year<=2023;year++){
            if((year%4==0 && year%100!=0) || year%400==0){
                System.out.print(year+" ");
                count++;
                if(count%10==0){
                    System.out.println();
                }
            }
        }

         */

        int times=0;
        for(int year=1900;year<=2023;year++){
            if((year%4==0&&year%100!=0)||year%400==0){
                System.out.print(year+" ");
                times++;
                if(times%10==0){
                    System.out.println();
                }
            }
        }



        /*
        int num=1;int sum=0;
        while(num<=100){
            sum=sum+num;
            num++;
        }
        System.out.println(sum);

         */


        /*
        System.out.println("请输入年份：");
        int year=scan.nextInt();
        System.out.println("请输入月份");
        int month=scan.nextInt();
        switch (month){
            case 1:
            case 3:
            case 5:
            case 7:
            case 8:
            case 10:
            case 12:
                System.out.println("31");
                break;
            case 4:
            case 6:
            case 9:
            case 11:
                System.out.println("30");
                break;
            case 2:
                if(year%4==0&&year%100!=0||year%400==0) {
                    System.out.println("28");
                }else{
                    System.out.println("29");
                }

        }

         */









        /*1接收用户输入的一个整数num，
        判断它的正负零值，正数则输出"+"，
        负数则输出"-"，0则输出"0"
         */
        /*
        System.out.println("请输入一个整数：");
        int num=scan.nextInt();
        if(num>0){
            System.out.println("+");
        }else if(num<0){
            System.out.println("-");
        }else{
            System.out.println("0");
        }

         */


    }
}
